<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>dequeue([queueName])</title>
<link type="text/css" rel="stylesheet" href="style/style.css" tppabs="http://www.erdangjiade.com/manual/jquery/jquery/style/style.css"  />
</head>
<body id="split">
<div id="content">
  
  <div rel="dequeue">
    <h2><span>返回值:jQuery</span>dequeue([queueName])</h2>
    <h3>概述</h3>
    <div class="desc">
      <p>从队列最前端移除一个队列函数，并执行他。</p>
      <div class="longdesc">
        <p></p>
      </div>
    </div>
    <h3>参数</h3>
    <div>
      <h4><strong>[queueName]</strong><span>String</span><em>V1.2</em></h4>
      <p>队列名，默认为fx</p>
    </div>
    <div class="example">
      <h3>示例</h3>
      <span id="f_ad2"></span>
            <h4>描述:</h4>
      <p>使用 dequeue() 终止一个自定义的队列函数</p>
      <h5>jQuery 代码:</h5>
      <pre><code>$("div").queue(function () {
  $(this).toggleClass("red");
  $(this).dequeue();
});</code></pre>
      <h4>描述:</h4>
      <p>用dequeue来结束自定义队列函数，并让队列继续进行下去。</p>
      <h5>HTML 代码:</h5>
      <pre><code>&lt;style&gt;
  div { margin:3px; width:50px; position:absolute;
        height:50px; left:10px; top:30px; 
        background-color:yellow; }
  div.red { background-color:red; }
  &lt;/style&gt;

  &lt;button&gt;Start&lt;/button&gt;
  &lt;div&gt;&lt;/div&gt;</code></pre>
      <h5>jQuery 代码:</h5>
      <pre><code>$("button").click(function () {
      $("div").animate({left:'+=200px'}, 2000);
      $("div").animate({top:'0px'}, 600);
      $("div").queue(function () {
          $(this).toggleClass("red");
          $(this).dequeue();
      });
      $("div").animate({left:'10px', top:'30px'}, 700);
  });</code></pre>
    </div>
  </div>
</div>
</body>
</html>
<div style="display:none">

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F327b016d332d3a7e4043796cab725707' type='text/javascript'%3E%3C/script%3E"));
</script>
</div><